|
|
prepare("select * from staff_table where staff_id_no =:a") ;
$stname->bindparam(":a",$stf) ;
$stname->execute() ;
$rname = $stname->fetch(pdo::FETCH_ASSOC) ;
$staffname = $rname['names'] ;
?>
|
|
|
|
|
|
|
|
|
|
prepare("select * from deductions where ((staff_id = '$stf' and deduction = 'LD') and (pyear='$dy' and pmonth='$dm'))") ;
$loan->execute() ;
if($loan->rowcount() > 0)
{
$lrow = $loan->fetch(pdo::FETCH_ASSOC) ;
$lds =$lrow['amount'] ;
}
else
{
$lds = 0 ;
}
echo $lds ;
?>
|
prepare("select * from deductions where ((staff_id = '$stf' and deduction = 'SA') and (pyear='$dy' and pmonth='$dm'))") ;
$sad->execute() ;
if($sad->rowcount() > 0)
{
$lrows = $sad->fetch(pdo::FETCH_ASSOC) ;
$sads =$lrows['amount'] ;
}
else
{
$sads = 0 ;
}
echo $sads ;
?>
|
prepare("select * from deductions where ((staff_id = '$stf' and deduction = 'OD') and (pyear='$dy' and pmonth='$dm'))") ;
$odd->execute() ;
if($odd->rowcount() > 0)
{
$orow = $odd->fetch(pdo::FETCH_ASSOC) ;
$oddn =$orow['amount'] ;
}
else
{
$oddn = 0 ;
}
echo $oddn ;
?>
|
|